From 3006f08c67e464465e4ba3786c5f03b525ecd07a Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Sun, 21 Apr 2024 06:37:34 -0700
Subject: feat(badges): conditional spacing for navigation

---
 src/routes/user/[user]/badges/+page.svelte | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'src/routes/user/[user]/badges/+page.svelte')

diff --git a/src/routes/user/[user]/badges/+page.svelte b/src/routes/user/[user]/badges/+page.svelte
index 546b637f..60453f65 100644
--- a/src/routes/user/[user]/badges/+page.svelte
+++ b/src/routes/user/[user]/badges/+page.svelte
@@ -897,6 +897,10 @@
 					</div>
 
 					{#if isBadgeSelected}
+						{@const anyAdjacentBadgeExists =
+							adjacentBadgeExists(selectedBadge, ungroupedBadges, -1) ||
+							adjacentBadgeExists(selectedBadge, ungroupedBadges, 1)}
+
 						<Popup
 							fullscreen
 							show={isBadgeSelected}
@@ -906,7 +910,9 @@
 						>
 							<BadgePreview bind:selectedBadge />
 
-							<p />
+							{#if anyAdjacentBadgeExists}
+								<p />
+							{/if}
 
 							{#if adjacentBadgeExists(selectedBadge, ungroupedBadges, -1)}
 								<button on:click={() => setAdjacentCursor(ungroupedBadges, -1)}>Previous</button>
-- 
cgit v1.2.3

